﻿<!DOCTYPE html>
<html>
<head>	
<meta charset="utf-8" />
<title>Dengo - Búsqueda</title>
<link rel="shortcut icon" href="img/icono.ico" />
<!-- Sytles -->
<link href="styles/cabecera.css" rel="stylesheet" type="text/css" />
<link href="styles/barraHerramientas.css" rel="stylesheet" type="text/css" />
<link href="styles/barraInferior.css" rel="stylesheet" type="text/css" />				
<link href="styles/buscar.css" rel="stylesheet" rel="stylesheet" />	
<link href="styles/menuPreferencias.css" rel="stylesheet" />
<!-- include jQuery + carouFredSel plugin -->
<script type="text/javascript" language="javascript" src="lib/caroufredsel/jquery-1.8.2.min.js"></script>
<script type="text/javascript" language="javascript" src="lib/caroufredsel/jquery.carouFredSel-6.2.1-packed.js"></script>
<!-- optionally include helper plugins -->
<script type="text/javascript" language="javascript" src="lib/caroufredsel/helper-plugins/jquery.mousewheel.min.js"></script>
<script type="text/javascript" language="javascript" src="lib/caroufredsel/helper-plugins/jquery.touchSwipe.min.js"></script>
<script type="text/javascript" language="javascript" src="lib/caroufredsel/helper-plugins/jquery.transit.min.js"></script>
<script type="text/javascript" language="javascript" src="lib/caroufredsel/helper-plugins/jquery.ba-throttle-debounce.min.js"></script>
<!-- Other Javascript functions -->
<script type="text/javascript" language="javascript" src="functions/js/preferences.js"></script>
<script type="text/javascript" language="javascript" src="functions/js/search.js"></script>
<script type="text/javascript" language="javascript" src="functions/js/carouselConfig.js"></script>

<script>
function ordenarPaginas(cantidadDePaginas) {
    
	for(i = 1; i <= cantidadDePaginas; i++) { 
		if (i == 1) {
		  
		   document.getElementById(1).style.display = "block";
		  
		   
		   document.getElementById(1000+i).style.display = "inline-block";
		   document.getElementById(1000+i).style.fontWeight = "700";
		   document.getElementById(1000+i).style.textDecoration = "none";
		   
		   document.getElementById(10000+i).style.display = "inline-block";
		   document.getElementById(10000+i).style.fontWeight = "700";
		   document.getElementById(10000+i).style.textDecoration = "none";
		   
		  document.getElementById('arribaIzq').style.visibility="hidden";
		   document.getElementById('abajoIzq').style.visibility="hidden";

		  
		   
		 }else{
		
			   
			   document.getElementById(1000+i).style.fontWeight = "normal";
			   document.getElementById(1000+i).style.textDecoration = "underline";
			   
			   
			   document.getElementById(10000+i).style.fontWeight = "normal";
			   document.getElementById(10000+i).style.textDecoration = "underline";
			   if (i < 11) {
					document.getElementById(1000+i).style.display = "inline-block";
					document.getElementById(10000+i).style.display = "inline-block";
					
			   }
		  }
     }
	 if (cantidadDePaginas == 1) {

				document.getElementById('arribaDer').style.visibility = "hidden";
				document.getElementById('arribaIzq').style.visibility = "hidden";
				document.getElementById('abajoDer').style.visibility = "hidden";
				document.getElementById('abajoIzq').style.visibility = "hidden";
	 }
	 
}
</script>


<script>

function showOnlyTenIndexes(cantidadDePaginas, paginaActiva) {
		
		
		if (paginaActiva < 7) {
			for(i = 1; i <= cantidadDePaginas; i++) {
				 if (i <= 10) {
				 document.getElementById(1000 + i).style.display ="inline-block";
				 document.getElementById(10000 + i).style.display ="inline-block";
				}else{
				 document.getElementById(1000 + i).style.display ="none";
				 document.getElementById(10000 + i).style.display ="none";
				}
			}
		}
		
		if(paginaActiva >= cantidadDePaginas - 3) {
			for(i = 1 ; i <= cantidadDePaginas; i++) {
				 if (i >= cantidadDePaginas - 9) {
				 document.getElementById(1000 + i).style.display ="inline-block";
				 document.getElementById(10000 + i).style.display ="inline-block";
				}else{
				 document.getElementById(1000 + i).style.display ="none";
				 document.getElementById(10000 + i).style.display ="none";
				}
			}
		}
		
		
		
		if (paginaActiva > 6 && paginaActiva < cantidadDePaginas - 3) {
		
	 
			for (j = 1; j < paginaActiva ; j++) {
				 if (j < paginaActiva - 5) {
				 document.getElementById(1000 + j).style.display ="none";
				 document.getElementById(10000 + j).style.display ="none";
	
				
				 }else{
				 document.getElementById(1000 + j).style.display ="inline-block";
				 document.getElementById(10000 + j).style.display ="inline-block";
		
				
				 }
				 
			}
	

			
			
			for (j = paginaActiva + 1; j <=cantidadDePaginas ; j++) {
				 if (j <= paginaActiva + 4) {
				 document.getElementById(1000 + j).style.display ="inline-block";
				 document.getElementById(10000 + j).style.display ="inline-block";
		
				 }else{
				 document.getElementById(1000 + j).style.display ="none";
				 document.getElementById(10000 + j).style.display ="none";
		
			
				 }
				 
			}
			
		}

}

</script>

<script>
function cambiarPagina(numeroDePagina, cantidadDePaginas) {
	location.href = "#"; 
	var paginaActiva;
	for(i = 1; i <= cantidadDePaginas; i++) { 
		if (i == numeroDePagina) {

		    document.getElementById(i).style.display = "block";

		   document.getElementById(1000+i).style.fontWeight = "700";
		   document.getElementById(1000+i).style.textDecoration = "none";
		   
		   document.getElementById(10000+i).style.fontWeight = "700";
		   document.getElementById(10000+i).style.textDecoration = "none";
		   paginaActiva = i;
		   
		 }else{
		    document.getElementById(i).style.display = "none";
		   
		   document.getElementById(1000+i).style.fontWeight = "normal";
		   document.getElementById(1000+i).style.textDecoration = "underline";
		   
		   document.getElementById(10000+i).style.fontWeight = "normal";
		   document.getElementById(10000+i).style.textDecoration = "underline";
		   
		  }
		 
     }
	 
	  if(paginaActiva > 1 && paginaActiva < cantidadDePaginas) {
	  
			
				document.getElementById('arribaDer').style.visibility = "visible";
				document.getElementById('arribaIzq').style.visibility = "visible";
				document.getElementById('abajoDer').style.visibility = "visible";
				document.getElementById('abajoIzq').style.visibility = "visible";

	  
	 }else{
	 
		   if (paginaActiva == 1 && cantidadDePaginas > 1 ) {
				
				document.getElementById('arribaDer').style.visibility = "visible";
				document.getElementById('arribaIzq').style.visibility = "hidden";
				document.getElementById('abajoDer').style.visibility = "visible";
				document.getElementById('abajoIzq').style.visibility = "hidden";
		 }
		 
		   if (paginaActiva == cantidadDePaginas && cantidadDePaginas > 1) {
				
				document.getElementById('arribaDer').style.visibility = "hidden";
				document.getElementById('arribaIzq').style.visibility = "visible";
				document.getElementById('abajoDer').style.visibility = "hidden";
				document.getElementById('abajoIzq').style.visibility = "visible";
		
		 }
	 }
	 
	showOnlyTenIndexes(cantidadDePaginas, paginaActiva);
		
	 
}
</script>

<script>
function nextPage(cantidadDePaginas) {
	location.href = "#"; 
	var paginaActiva;
	for(i = 1; i <= cantidadDePaginas - 1; i++) { 
		
		
		paginaActiva = i + 1;
		if (document.getElementById(10000+i).style.fontWeight == "700") {
		   
		   document.getElementById(i + 1).style.display = "block";

		   
		   document.getElementById(i).style.display = "none";

		   
		   document.getElementById(10000+i).style.fontWeight = "normal";
		   document.getElementById(10000+i).style.textDecoration = "underline";
		   
		   document.getElementById(10000+i+1).style.fontWeight = "700";
		   document.getElementById(10000+i+1).style.textDecoration = "none";
		   
		   
		   
		   document.getElementById(1000+i).style.fontWeight = "normal";
		   document.getElementById(1000+i).style.textDecoration = "underline";
		   
		   document.getElementById(1000+i+1).style.fontWeight = "700";
		   document.getElementById(1000+i+1).style.textDecoration = "none";
		   
		  break;
		   
		 }
		  
     }
	 
	  if(paginaActiva > 1 && paginaActiva < cantidadDePaginas) {
	  
			
			    document.getElementById('arribaDer').style.visibility = "visible";
				document.getElementById('arribaIzq').style.visibility = "visible";
				document.getElementById('abajoDer').style.visibility = "visible";
				document.getElementById('abajoIzq').style.visibility = "visible";

	  
	 }else{
	 
		   if (paginaActiva == 1) {
				
				document.getElementById('arribaDer').style.visibility = "visible";
				document.getElementById('arribaIzq').style.visibility = "hidden";
				document.getElementById('abajoDer').style.visibility = "visible";
				document.getElementById('abajoIzq').style.visibility = "hidden";
			
		 }
		 
		   if (paginaActiva == cantidadDePaginas) {
				
				document.getElementById('arribaDer').style.visibility = "hidden";
				document.getElementById('arribaIzq').style.visibility = "visible";
				document.getElementById('abajoDer').style.visibility = "hidden";
				document.getElementById('abajoIzq').style.visibility = "visible";
		
		 }
	 }
	 showOnlyTenIndexes(cantidadDePaginas, paginaActiva);
}
</script>

<script>
function previousPage(cantidadDePaginas) {
	location.href = "#"; 
	var paginaActiva;
	for(i = 2; i <= cantidadDePaginas; i++) { 
		
		if (document.getElementById(10000+i).style.fontWeight == "700") {
		
			paginaActiva = i - 1;
		  
		    document.getElementById(i - 1).style.display = "block"; 
		   
		   
		   document.getElementById(i).style.display = "none";

		   document.getElementById(10000+i).style.fontWeight = "normal";
		   document.getElementById(10000+i).style.textDecoration = "underline";
		   
		   document.getElementById(10000+i-1).style.fontWeight = "700";
		   document.getElementById(10000+i-1).style.textDecoration = "none";
		   
		   
		   
		   document.getElementById(1000+i).style.fontWeight = "normal";
		   document.getElementById(1000+i).style.textDecoration = "underline";
		   
		   document.getElementById(1000+i-1).style.fontWeight = "700";
		   document.getElementById(1000+i-1).style.textDecoration = "none";
		   
		  break;
		   
		 }
     }
	 
	  if(paginaActiva > 1 && paginaActiva < cantidadDePaginas) {
	  
			
				document.getElementById('arribaDer').style.visibility = "visible";
				document.getElementById('arribaIzq').style.visibility = "visible";
				document.getElementById('abajoDer').style.visibility = "visible";
				document.getElementById('abajoIzq').style.visibility = "visible";
	  
	 }else{
	 
		   if (paginaActiva == 1) {
				
				document.getElementById('arribaDer').style.visibility = "visible";
				document.getElementById('arribaIzq').style.visibility = "hidden";
				document.getElementById('abajoDer').style.visibility = "visible";
				document.getElementById('abajoIzq').style.visibility = "hidden";

		 }
		 
		   if (paginaActiva == cantidadDePaginas) {
				
				document.getElementById('arribaDer').style.visibility = "hidden";
				document.getElementById('arribaIzq').style.visibility = "visible";
				document.getElementById('abajoDer').style.visibility = "hidden";
				document.getElementById('abajoIzq').style.visibility = "visible";

		 }
	 }
	 showOnlyTenIndexes(cantidadDePaginas, paginaActiva);
}
</script>

</head>
<body>
<?php
include_once('frontend/banner.php');
include_once('frontend/toolbar.php');
include_once('frontend/searchView.php');
include_once('frontend/contact.php');
?>
</body>
</html>

